import mongoose from 'mongoose';

const ExampleSchema = new mongoose.Schema({
  title: {
    type: String,
    required: true,
  },
  completed: {
    type: Boolean,
    required: true,
    default: false,
  },
  content: {
    type: String,
    required: false,
  },
}, {
  timestamps: true, // 自动添加 createdAt 和 updatedAt
});

export const Example = mongoose.model('Example', ExampleSchema);
